package cheme.ProcessModel.Cmds;

import org.eclipse.gef.commands.Command;

import cheme.ProcessModel.IParent;
import cheme.ProcessModel.ProcessUnits.IProcessUnit;


public class CreateProcessUnitCmd extends Command
{
	private IParent parent;

	private IProcessUnit processUnit;

	public void execute()
	{
		parent.add(processUnit);
	}

	public void setParent(IParent parent)
	{
		this.parent = parent;
	}

	public void setChild(IProcessUnit processUnit)
	{
		this.processUnit = processUnit;
	}

	public void undo()
	{
		parent.remove(processUnit);
	}
}
